/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author cjl
* @date 2023-06-07
**/
@Entity
@Data
@Table(name="dcc_kpsp")
public class DccKpsp implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "`status`")
    @ApiModelProperty(value = "状态")
    private Integer status;

    @Column(name = "`type`")
    @ApiModelProperty(value = "类别")
    private String type;

    @Column(name = "`vedio`")
    @ApiModelProperty(value = "视频链接")
    private String vedio;

    @Column(name = "`vedio_suoluetu`")
    @ApiModelProperty(value = "视频缩略图")
    private String vedioSuoluetu;

    @Column(name = "`jainjie`")
    @ApiModelProperty(value = "简介")
    private String jainjie;

    @Column(name = "`operator`")
    @ApiModelProperty(value = "操作者")
    private String operator;

    @Column(name = "`num`")
    @ApiModelProperty(value = "排序")
    private Integer num;

    @Column(name = "`created_at`")
    @ApiModelProperty(value = "创建时间")
    private Timestamp createdAt;

    @Column(name = "`updated_at`")
    @ApiModelProperty(value = "修改时间")
    private Timestamp updatedAt;

    @Column(name = "`title`")
    @ApiModelProperty(value = "标题")
    private String title;

    @Column(name = "`content`")
    @ApiModelProperty(value = "内容")
    private String content;

    public void copy(DccKpsp source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
